// 圆形option对象封装块
const  circular ={
    chart: {
            plotBackgroundColor: null,
            plotBorderWidth: null,
            plotShadow: false,
            type: 'pie',
            backgroundColor:'#fffced',
            animation:true,
         
           
    },
    reflow:true,
    //对版权声明进行操作，enabled为false表示不显示，  具体看文档api以及使用教程中的credits字段
    credits: {
                  enabled: false,
                  text:"Corner提供",
                  href:"www.baidu.com"
              },
    title: {
            text: '舆情关键词分布图'
    },
    tooltip: {
            pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
    },
    plotOptions: {
            pie: {
                    allowPointSelect: true,
                    cursor: 'pointer',
                    dataLabels: {
                            enabled: false
                    },
                    showInLegend: true
            }
    },
    series: []
};

// 柱形图的对象封装
const cloumnar = {
    chart: {
        type: 'column',
        backgroundColor:'#fffced',
     
    },
    reflow:true,
    title: {
        text: '关键词类型统计'
    },
    subtitle: {
        text: 'Corner提供'
    },
    xAxis: {
        categories: [
            '企业舆情','油田舆情'
        ],
        crosshair: true,
    },
    yAxis: {
        min: 0,
        title: {
            text: '网站类型'
        },
        softMax: '80K',
    },
    tooltip: {
        // head + 每个 point + footer 拼接成完整的 table
        headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
        pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
        '<td style="padding:0"><b>{point.y:.1f} k</b></td></tr>',
        footerFormat: '</table>',
        shared: true,
        useHTML: true,
        animation: true,
        backgroundColor: '#eeeeee',
    },
    plotOptions: {
        column: {
            borderWidth: 0
        }
    },
    series: []
};

// 暴露接口给外部使用
const  higtChats ={
    // ES6简写
    cloumnar,
    circular:circular
}
export default higtChats















